package com.chengqs.jvm.t1.stack;

/**
 * 演示栈帧
 * 禁用指针压缩
 * -XX:-UseCompressedOops -XX:-UseCompressedClassPointers
 */
public class Demo1_1 {
    public static void main(String[] args) throws InterruptedException {
        Test test = new Test();
        int[] arr = new int[]{1, 2, 3, 4};
        method1(test);
    }

    public static void method1(Test test) {
        Class<? extends Test> aClass = test.getClass();
        method2(1, 2);
    }

    public static int method2(int a, int b) {
        int c =  a + b;
        return c;
    }
}

class Test implements inter {
    int age = 10;
    String name = "chengqs";

    public void eat() {
        System.out.println("eat");
    }
}

interface inter {
    void eat();
}
